package com.sunlei.webtest.controller;

import com.sunlei.webtest.bean.HJXX;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by 001 on 2017/7/19.
 */
@RestController
@RequestMapping("/search")
public class HJXXController {

    @RequestMapping("/HJXX")
    public List<HJXX> getHJXX(@RequestParam(value = "username", required = true) String name,
                                @RequestParam(value = "date", required = true) String date) {
        HJXX data1 = new HJXX("0001","test火警","一楼","警卫室",
                "东南角","报警器","火警","2017/01/01","未确认","无",0);
        HJXX data2 = new HJXX("0002","test火警","一楼","警卫室",
                "东南角","报警器","火警","2017/01/01","未确认","无",0);
        HJXX data3 = new HJXX("0003","test火警","一楼","警卫室",
                "东南角","报警器","火警","2017/01/01","未确认","无",0);
        HJXX data4 = new HJXX("0004","test火警","一楼","警卫室",
                "东南角","报警器","火警","2017/01/01","未确认","无",0);
        HJXX data5 = new HJXX("0005","test火警","一楼","警卫室",
                "东南角","报警器","火警","2017/01/01","未确认","无",0);
        List<HJXX> dataList = new ArrayList<HJXX>();
        dataList.add(data1);
        dataList.add(data2);
        dataList.add(data3);
        dataList.add(data4);
        dataList.add(data5);
        return dataList;
    }

}
